function startCourse()

{

        // check to see if cookies is enabled, otherwise, this won't work

        if( typeof sessionStorage == "undefined" || sessionStorage.disabled )

        {

                alert( "You must enable cookies for this course to work properly." );

        }

        else

        {

                // if it is enabled, checked to see if this course was started

                // if it was not able to retrieve, the key "course_started", then

                // then this is the first time we are running the course

	        if( !sessionStorage.getItem( "course_started" ) )

	        {

	                // clear the session storage

	            sessionStorage.clear();

	            // set the "key" by giving it a value.  all values are strings!

	                sessionStorage.setItem( "course_started", "1" );

	                sessionStorage.setItem( "bulgaria", "0" );

	                sessionStorage.setItem( "denmark", "0" );

	                sessionStorage.setItem( "niger", "0" );

	                sessionStorage.setItem( "luxembourg", "0" );

	                

	        }

        }

}

function visitLuxembourg()

{

        sessionStorage.setItem( "luxembourg", "visited" );

        showQuiz();

} 

        



function visitNiger()

{

        sessionStorage.setItem( "niger", "visited" );

        showQuiz();

}



function visitDenmark()

{

        sessionStorage.setItem( "denmark", "visited" );

        showQuiz();

}



function visitBulgaria()

{

        sessionStorage.setItem( "bulgaria", "visited" );

        showQuiz();

}





// this function will check to see if every page was visited

// if so, show the quiz link

function showQuiz()

{

	   

        var bulgariaVisited = sessionStorage.getItem( "bulgaria" );

        var denmarkVisited = sessionStorage.getItem( "denmark" );

        var nigerVisited = sessionStorage.getItem( "niger" );

        var luxembourgVisited = sessionStorage.getItem( "luxembourg" );

        
        

        
        if( bulgariaVisited == "visited" && denmarkVisited == "visited" && nigerVisited == "visited" && luxembourgVisited == "visited")

        {
               document.getElementById( "quiz-link" ).style.display = "inline";

        }

       

}

